home *** CD-ROM | disk | FTP | other *** search
/ 1,000+ Great Games / 1_1000 Games.iso / DOSGAMES / BOGGLE.ZIP / SOURCE.ZIP / ABOUT.CPP next >
Encoding:
C/C++ Source or Header  |  1996-03-03  |  1.9 KB  |  53 lines

  1. /*****************************************************************************
  2. * Program:  ABOUT.CPP
  3. * Purpose:  Handles items with the about dialog box
  4. *****************************************************************************/
  5. #include <os2.h>
  6. #include <icmdevt.hpp>                  //ICommandEvent
  7. #include <ireslib.hpp>                  //IResourceLibrary/IResourceId Class
  8. #include <stdlib.h>
  9.  
  10. #include "about.hpp"                 //AboutDialog Class
  11.  
  12. /*****************************************************************************
  13. * Function: AboutDialog
  14. * Parms:    owner windows
  15. * Purpose:  Constructor
  16. * Returns:  Nothing
  17. *****************************************************************************/
  18. AboutDialog :: AboutDialog(IWindow * ownerWnd, unsigned long rid, TBogWindow* pbwindow)
  19.              : IFrameWindow(IResourceId(rid), ownerWnd)
  20. {
  21.    ICommandHandler::handleEventsFor(this); //Set self as command event handler
  22.  
  23. /*****************************************************************************
  24. * Function: ~AboutDialog
  25. * Parms:    none
  26. * Purpose:  Destructor
  27. * Returns:  Nothing
  28. *****************************************************************************/
  29. AboutDialog :: ~AboutDialog()
  30. {
  31. //  ICommandHandler::stopHandlingEventsFor(this);  
  32.  
  33. /*****************************************************************************
  34. * Function: command
  35. * Parms:    cmdevt
  36. * Purpose:  handle the event for the command button
  37. * Returns:  true - OK was pressed,  false otherwise
  38. *****************************************************************************/
  39. Boolean AboutDialog :: command(ICommandEvent& cmdevt)
  40. {
  41.    switch(cmdevt.commandId()) 
  42.    {
  43.    case DID_OK:
  44.       dismiss(DID_OK);                 //Dismiss Dialog - Allow focus to main
  45.       return(true);                    //Return Processing Completed
  46.       break;
  47.    }
  48.    return(false);                       //Allow Default Processing to occur
  49. }
  50.  
  51.